import { handleActions } from 'redux-actions'

const init = {
  list: {},
  detail: {}
}

export default
handleActions({
  'reset transfer': (state) => ({
    ...state,
    ...init
  }),
  'fetch transfer list': (state, { payload }) => ({
    list: payload
  }),
  'fetch transfer detail': (state, { payload }) =>({
    detail: payload
  })
}, init)
